package org.springframework.samples.travel.interfaces.web.controller;

import java.security.Principal;

import org.springframework.samples.travel.domain.shared.SearchCriteria;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class UserController {

    @RequestMapping(value = "/users/profile", method = RequestMethod.GET)
    public String search(SearchCriteria searchCriteria, Principal currentUser, Model model) {
	if (currentUser != null) {
	    /*
	     * List<Booking> bookingList =
	     * bookingService.findBookings(currentUser.getName());
	     * model.addAttribute("bookingList", bookingList);//
	     */
	    return "users/profile";
	}
	return null;
    }

}